package com.dayang.nm.ugcaudit.action;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import net.sf.json.JSONArray;
import net.sf.json.JSONObject;

import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionMapping;

import com.dayang.baseplatform.model.CommonDisplay;
import com.dayang.baseplatform.model.UgcTask;
import com.dayang.baseplatform.service.CatalogListService;
import com.dayang.baseplatform.service.DestListService;
import com.dayang.baseplatform.service.ugcaudit.AuditListService;

public class DestListAction extends BaseAction {

	@Override
	public String create(ActionMapping mapping, ActionForm form, HttpServletRequest request,
			HttpServletResponse response) throws Exception {

		return null;
	}

	@Override
	public String delete(ActionMapping mapping, ActionForm form, HttpServletRequest request,
			HttpServletResponse response) throws Exception {
		return null;
	}

	@Override
	public String update(ActionMapping mapping, ActionForm form, HttpServletRequest request,
			HttpServletResponse response) throws Exception {

		return null;
	}

	@Override
	public String read(ActionMapping mapping, ActionForm form, HttpServletRequest request,
			HttpServletResponse response) throws Exception {

		DestListService s = new DestListService();
		
		List destList = s.read();
		
		Map rsMap = new HashMap();
		
		rsMap.put("items",destList);
		
		String rs = JSONObject.fromBean(rsMap).toString();
		
		return rs;
	}

	//tomato princess...

}
